package cn.edu.sgu.www.mhxysy.dto.gang;

import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class GangSkillCategoryDTO implements DataTransferObject {

    @ApiModelProperty(value = "ID")
    private Integer id;

    /**
     * 技能名称
     */
    @NotBlank(message = "技能名称" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "技能名称", required = true)
    private String name;

    /**
     * 技能评分
     */
    @PositiveOrZero(message = "技能评分" + CustomMessages.ILLEGAL)
    @NotNull(message = "技能评分" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "技能评分", required = true)
    private Integer score;

    /**
     * 等级上限
     */
    @Range(min = 10, max = 20, message = "等级上限" + CustomMessages.ILLEGAL)
    @NotNull(message = "等级上限" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "等级上限", required = true)
    private Integer grade;

    /**
     * 技能说明
     */
    @NotBlank(message = "技能说明" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "技能说明", required = true)
    private String note;

    /**
     * 技能效果
     */
    @NotBlank(message = "技能效果" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "技能效果", required = true)
    private String effect;
}